import { useStoreContext } from '../../../context';

function Remove ({ todo }) {
  const { todosStore } = useStoreContext();

  return (
    <button className="destroy" onClick={() => todosStore.remove(todo.id)} />
  );
}

export default Remove;